package com.wangshen.base.ui.mvp.base.presenter;


import android.os.Bundle;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;

/**
 * description：页面生命周期回调，每个Presenter都可以通过注解的方式来指定在哪个生命周期方法中执行
 * <p>
 * author： DS.Hu
 * <p>
 * time： 2018/7/20 15:41
 */
public interface ExLifecycleObserver extends LifecycleObserver {

    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    void onCreate();

    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    void onStart();

    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    void onResume();

    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    void onPause();

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    void onStop();

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    void onDestroy();

    void onRestoreInstanceState(Bundle saveBundle);

    void onSaveInstanceState(Bundle saveBundle);
}
